#pragma once

#include "D2CommonDefinitions.h"
#include <D2Skills.h>

#pragma pack(1)

enum D2C_StateTransformTypes
{
	TRANSFORMTYPE_PLAYER = 1,
	TRANSFORMTYPE_MONSTER = 2,
};

enum D2C_States
{
	STATE_NONE = 0,
	STATE_FREEZE,
	STATE_POISON,
	STATE_RESISTFIRE,
	STATE_RESISTCOLD,
	STATE_RESISTLIGHT,
	STATE_RESISTMAGIC,
	STATE_PLAYERBODY,
	STATE_RESISTALL,
	STATE_AMPLIFYDAMAGE,
	STATE_FROZENARMOR,
	STATE_COLD,
	STATE_INFERNO,
	STATE_BLAZE,
	STATE_BONEARMOR,
	STATE_CONCENTRATE,
	STATE_ENCHANT,
	STATE_INNERSIGHT,
	STATE_SKILL_MOVE,
	STATE_WEAKEN,
	STATE_CHILLINGARMOR,
	STATE_STUNNED,
	STATE_SPIDERLAY,
	STATE_DIMVISION,
	STATE_SLOWED,
	STATE_FETISHAURA,
	STATE_SHOUT,
	STATE_TAUNT,
	STATE_CONVICTION,
	STATE_CONVICTED,
	STATE_ENERGYSHIELD,
	STATE_VENOMCLAWS,
	STATE_BATTLEORDERS,
	STATE_MIGHT,
	STATE_PRAYER,
	STATE_HOLYFIRE,
	STATE_THORNS,
	STATE_DEFIANCE,
	STATE_THUNDERSTORM,
	STATE_LIGHTNINGBOLT,
	STATE_BLESSEDAIM,
	STATE_STAMINA,
	STATE_CONCENTRATION,
	STATE_HOLYWIND,
	STATE_HOLYWINDCOLD,
	STATE_CLEANSING,
	STATE_HOLYSHOCK,
	STATE_SANCTUARY,
	STATE_MEDITATION,
	STATE_FANATICISM,
	STATE_REDEMPTION,
	STATE_BATTLECOMMAND,
	STATE_PREVENTHEAL,
	STATE_CONVERSION,
	STATE_UNINTERRUPTABLE,
	STATE_IRONMAIDEN,
	STATE_TERROR,
	STATE_ATTRACT,
	STATE_LIFETAP,
	STATE_CONFUSE,
	STATE_DECREPIFY,
	STATE_LOWERRESIST,
	STATE_OPENWOUNDS,
	STATE_DOPPLEZON,
	STATE_CRITICALSTRIKE,
	STATE_DODGE,
	STATE_AVOID,
	STATE_PENETRATE,
	STATE_EVADE,
	STATE_PIERCE,
	STATE_WARMTH,
	STATE_FIREMASTERY,
	STATE_LIGHTNINGMASTERY,
	STATE_COLDMASTERY,
	STATE_SWORDMASTERY,
	STATE_AXEMASTERY,
	STATE_MACEMASTERY,
	STATE_POLEARMMASTERY,
	STATE_THROWINGMASTERY,
	STATE_SPEARMASTERY,
	STATE_INCREASEDSTAMINA,
	STATE_IRONSKIN,
	STATE_INCREASEDSPEED,
	STATE_NATURALRESISTANCE,
	STATE_FINGERMAGECURSE,
	STATE_NOMANAREGEN,
	STATE_JUSTHIT,
	STATE_SLOWMISSILES,
	STATE_SHIVERARMOR,
	STATE_BATTLECRY,
	STATE_BLUE,
	STATE_RED,
	STATE_DEATH_DELAY,
	STATE_VALKYRIE,
	STATE_FRENZY,
	STATE_BERSERK,
	STATE_REVIVE,
	STATE_ITEMFULLSET,
	STATE_SOURCEUNIT,
	STATE_REDEEMED,
	STATE_HEALTHPOT,
	STATE_HOLYSHIELD,
	STATE_JUST_PORTALED,
	STATE_MONFRENZY,
	STATE_CORPSE_NODRAW,
	STATE_ALIGNMENT,
	STATE_MANAPOT,
	STATE_SHATTER,
	STATE_SYNC_WARPED,
	STATE_CONVERSION_SAVE,
	STATE_PREGNANT,
	STATE_111,
	STATE_RABIES,
	STATE_DEFENSE_CURSE,
	STATE_BLOOD_MANA,
	STATE_BURNING,
	STATE_DRAGONFLIGHT,
	STATE_MAUL,
	STATE_CORPSE_NOSELECT,
	STATE_SHADOWWARRIOR,
	STATE_FERALRAGE,
	STATE_SKILLDELAY,
	STATE_PROGRESSIVE_DAMAGE,
	STATE_PROGRESSIVE_STEAL,
	STATE_PROGRESSIVE_OTHER,
	STATE_PROGRESSIVE_FIRE,
	STATE_PROGRESSIVE_COLD,
	STATE_PROGRESSIVE_LIGHTNING,
	STATE_SHRINE_ARMOR,
	STATE_SHRINE_COMBAT,
	STATE_SHRINE_RESIST_LIGHTNING,
	STATE_SHRINE_RESIST_FIRE,
	STATE_SHRINE_RESIST_COLD,
	STATE_SHRINE_RESIST_POISON,
	STATE_SHRINE_SKILL,
	STATE_SHRINE_MANA_REGEN,
	STATE_SHRINE_STAMINA,
	STATE_SHRINE_EXPERIENCE,
	STATE_FENRIS_RAGE,
	STATE_WOLF,
	STATE_BEAR,
	STATE_BLOODLUST,
	STATE_CHANGECLASS,
	STATE_ATTACHED,
	STATE_HURRICANE,
	STATE_ARMAGEDDON,
	STATE_INVIS,
	STATE_BARBS,
	STATE_WOLVERINE,
	STATE_OAKSAGE,
	STATE_VINE_BEAST,
	STATE_CYCLONEARMOR,
	STATE_CLAWMASTERY,
	STATE_CLOAK_OF_SHADOWS,
	STATE_RECYCLED,
	STATE_WEAPONBLOCK,
	STATE_CLOAKED,
	STATE_QUICKNESS,
	STATE_BLADESHIELD,
	STATE_FADE,
	STATE_SUMMONRESIST,
	STATE_OAKSAGECONTROL,
	STATE_WOLVERINECONTROL,
	STATE_BARBSCONTROL,
	STATE_DEBUGCONTROL,
	STATE_ITEMSET1,
	STATE_ITEMSET2,
	STATE_ITEMSET3,
	STATE_ITEMSET4,
	STATE_ITEMSET5,
	STATE_ITEMSET6,
	STATE_RUNEWORD,
	STATE_RESTINPEACE,
	STATE_CORPSEEXP,
	STATE_WHIRLWIND,
	STATE_FULLSETGENERIC,
	STATE_MONSTERSET,
	STATE_DELERIUM,
	STATE_ANTIDOTE,
	STATE_THAWING,
	STATE_STAMINAPOT,
	STATE_PASSIVE_RESISTFIRE,
	STATE_PASSIVE_RESISTCOLD,
	STATE_PASSIVE_RESISTLTNG,
	STATE_UBERMINION,
};

enum D2C_StateMasks
{
	STATEMASK_NOSEND,
	STATEMASK_AURA,
	STATEMASK_HIDE,
	STATEMASK_TRANSFORM,
	STATEMASK_PGSV,
	STATEMASK_ACTIVE,
	STATEMASK_REMHIT,
	STATEMASK_DAMBLUE,
	STATEMASK_DAMRED,
	STATEMASK_ATTBLUE,
	STATEMASK_ATTRED,
	STATEMASK_CURSE,
	STATEMASK_CURABLE,
	STATEMASK_PLRSTAYDEATH,
	STATEMASK_MONSTAYDEATH,
	STATEMASK_BOSSSTAYDEATH,
	STATEMASK_DISGUISE,
	STATEMASK_RESTRICT,
	STATEMASK_BLUE,
	STATEMASK_ARMBLUE,
	STATEMASK_RFBLUE,
	STATEMASK_RCBLUE,
	STATEMASK_RLBLUE,
	STATEMASK_RPBLUE,
	STATEMASK_STAMBARBLUE,
	STATEMASK_ARMRED,
	STATEMASK_RFRED,
	STATEMASK_RCRED,
	STATEMASK_RLRED,
	STATEMASK_RPRED,
	STATEMASK_EXP,
	STATEMASK_SHATTER,
	STATEMASK_LIFE,
	STATEMASK_UDEAD,
	STATEMASK_GREEN,
	STATEMASK_NOOVERLAYS,
	STATEMASK_NOCLEAR,
	STATEMASK_BOSSINV,
	STATEMASK_MELEEONLY,
	STATEMASK_NOTONDEAD,
};

#pragma pack()

//D2Common.0x6FDB4560 (#10486)
D2COMMON_DLL_DECL void __stdcall STATES_ToggleState(D2UnitStrc* pUnit, int nState, BOOL bSet);
//D2Common.0x6FDB45A0 (#10487)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckState(D2UnitStrc* pUnit, int nState);
//D2Common.0x6FDB45F0 (#10488)
D2COMMON_DLL_DECL void __stdcall STATES_ToggleGfxStateFlag(D2UnitStrc* pUnit, int nState, BOOL bSet);
//D2Common.0x6FDB4670 (#10489)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckGfxStateFlag(D2UnitStrc* pUnit, int nState);
//D2Common.0x6FDB46C0 (#10491)
D2COMMON_DLL_DECL void __stdcall STATES_ClearGfxStateFlags(D2UnitStrc* pUnit);
//D2Common.0x6FDB4710 (#10490)
D2COMMON_DLL_DECL BOOL __stdcall STATES_IsAnyGfxStateFlagSet(D2UnitStrc* pUnit);
//D2Common.0x6FDB4760 (#10492)
D2COMMON_DLL_DECL uint32_t* __stdcall STATES_GetGfxStateFlags(D2UnitStrc* pUnit);
//D2Common.0x6FDB4790 (#10493)
D2COMMON_DLL_DECL void __stdcall STATES_UpdateStayDeathFlags(D2UnitStrc* pUnit, BOOL bIsBoss);
//D2Common.0x6FDB48F0 (#10494)
D2COMMON_DLL_DECL uint32_t* __stdcall D2COMMON_10494_STATES_GetStatFlags(D2UnitStrc* pUnit);
//D2Common.0x6FDB4900 (#10495)
D2COMMON_DLL_DECL int __fastcall STATES_GetNumberOfStateFlags();
//D2Common.0x6FDB4920 (#10496)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskAuraByStateId(int nState);
//D2Common.0x6FDB4960 (#10503)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskAuraOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB49D0 (#10500)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskPgsvByStateId(int nState);
//D2Common.0x6FDB4A10 (#11234)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskPgsvOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4A80 (#10501)
D2COMMON_DLL_DECL void __stdcall STATES_UpdatePgsvFlags(D2UnitStrc* pUnit);
//D2Common.0x6FDB4B20 (#10558)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskHideByStateId(int nState);
//D2Common.0x6FDB4B50 (#10557)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskHideOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4BC0 (#10502)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskActiveOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4C30 (#11272)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRemHitOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4CA0 (#10538)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskDamBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4D10 (#10545)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskDamRedOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4D80 (#10537)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskAttBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4DF0 (#10544)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskAttRedOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB4E60 (#10551)
D2COMMON_DLL_DECL BOOL __stdcall STATES_IsUnitShapeShifted(D2UnitStrc* pUnit);
//D2Common.0x6FDB4E80 (#10497)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskCurseByStateId(int nState);
//D2Common.0x6FDB4EC0 (#10498)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskCurableByStateId(int nState);
//D2Common.0x6FDB4F00 (#10554)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskStayDeathOnUnitByStateId(D2UnitStrc* pUnit, int nState);
//D2Common.0x6FDB4F60
BOOL __fastcall STATES_CheckStateMaskRestrictOnUnit(D2UnitStrc* pUnit, D2SkillStrc* pSkill);
//D2Common.0x6FDB4FC0 (#10536)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5030 (#10539)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskArmBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB50A0 (#10540)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRFBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5110 (#10541)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRCBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5180 (#10542)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRLBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB51F0 (#10543)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRPBlueOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5260 (#10546)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskArmRedOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB52D0 (#10547)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRFRedOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5340 (#10548)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRCRedOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB53B0 (#10549)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRLRedOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5420 (#10550)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskRPRedOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5490 (#10552)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskExpOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5500 (#10553)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskExpByStateId(int nState);
//D2Common.0x6FDB5540 (#10555)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskShatterOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB55B0 (#10556)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskShatterByStateId(int nState);
//D2Common.0x6FDB55F0 (#10559)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskLifeOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5660 (#10560)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskUdeadOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB56D0 (#10561)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskGreenOnUnit(D2UnitStrc* pUnit);
//D2Common.0x6FDB5740 (#11303)
D2COMMON_DLL_DECL BOOL __stdcall STATES_CheckStateMaskOnUnit(D2UnitStrc* pUnit, int nStateMask);
